import { type } from "os";

//  获取医院列表参数类型设置
export interface getHospitalSearchParamsType {
  hoscode?: string;
  hosname?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  status?: 0 | 1;
}

//定义content中的每一项数据中的bookingRule
export interface bookingRuleType {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

// 获取医院列表中content中的每一项数据的类型设置
export interface getHospitalListItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: 0 | 1;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  route: string;
  logoData: string;
  intro: string;
  status: 0 | 1;
  bookingRule: bookingRuleType | null;
}

//获取医院列表中content的数据类型设置
export type getHospitalListContentType = getHospitalListItemType[];

//获取医院列表的完整数据类型设置
export interface getHospitalListType {
  content: getHospitalListContentType;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

// 2、定义获取所有的省份的每一项的数据类型
export interface getProvinceItemType {
  createTime: string;
  dictCode: string;
  hasChildren: boolean;
  id: number;
  isDeleted: number;
  name: string;
  param: object;
  parentId: number;
  updateTime: string;
  value: string;
}
//   定义获取所有的省份的数据类型
export type getProvinceType = getProvinceItemType[];

// 定义详情页请求到的数据类型
export interface getHospitalDetailType {
  bookingRule?: bookingRuleType;
  hospital?: getHospitalListItemType;
}

//医院排版科室数据请求每一项类型
export interface getHospitalDepartmentItemType {
  depcode: string;
  depname: string;
  children: getHospitalDepartmentListType | null;
}

//医院排版科室数据请求类型
export type getHospitalDepartmentListType = getHospitalDepartmentItemType[];

//医院排班规则Parames数据请求
export interface getHospitalScheduleRuleParamsType {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}
//医院排班规则中bookingScheduleList中的每一项的数据请求getHospitalScheduleRuleListType
export interface getHospitalBookingScheduleItemType {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}
//医院排班规则中bookingScheduleList的数据请求
export type getHospitalBookingScheduleListType =
  getHospitalBookingScheduleItemType[];
//医院排班规则的数据请求
export interface getHospitalScheduleRuleListType {
  total: number;
  bookingScheduleList: getHospitalBookingScheduleListType;
  baseMap: {
    hosname: string;
  };
}

// 医院排班日期和详情参数Params请求类型
export interface getHospitalScheduleAndDetailParamsType {
  hoscode: string;
  depcode: string;
  workDate: string;
}

// 医院排班日期和详情参数请求中的每一项类型
export interface getHospitalScheduleAndDetailItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 0 | 1;
  hosScheduleId: string;
}
// 医院排班日期和详情参数请求类型
export type getHospitalScheduleAndDetailListType =
  getHospitalScheduleAndDetailItemType[];
